package com.ce.pms.charge.model;

import com.ce.pms.common.model.SysInfo;
import com.sitechasia.webx.core.model.IDomainObject;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name="FEE_CONCESSIONARY_PERIOD")
public class ConcessionaryPeriod
  implements IDomainObject
{

  @Id
  @GeneratedValue
  @Column(name="CONCESSIONARY_PERIOD_ID")
  private Long keyword;

  @ManyToOne
  @JoinColumn(name="PERIOD_ID", nullable=false)
  private PeriodDomain period;

  @Column(name="START_DATE", nullable=false)
  @Temporal(TemporalType.DATE)
  private Date startDate;

  @Column(name="END_DATE", nullable=false)
  @Temporal(TemporalType.DATE)
  private Date endDate;

  @Column(name="IFCURRENT", length=1, nullable=false)
  private String isCurrent;

  @Embedded
  private SysInfo sysInfo;

  public ConcessionaryPeriod(Long keyword)
  {
    this.keyword = keyword;
  }

  public Date getEndDate()
  {
    return this.endDate;
  }

  public void setEndDate(Date endDate) {
    this.endDate = endDate;
  }

  public String getIsCurrent() {
    return this.isCurrent;
  }

  public void setIsCurrent(String isCurrent) {
    this.isCurrent = isCurrent;
  }

  public Long getKeyword() {
    return this.keyword;
  }

  public void setKeyword(Long keyword) {
    this.keyword = keyword;
  }

  public PeriodDomain getPeriod() {
    return this.period;
  }

  public void setPeriod(PeriodDomain period) {
    this.period = period;
  }

  public Date getStartDate() {
    return this.startDate;
  }

  public void setStartDate(Date startDate) {
    this.startDate = startDate;
  }

  public SysInfo getSysInfo() {
    return this.sysInfo;
  }

  public void setSysInfo(SysInfo sysInfo) {
    this.sysInfo = sysInfo;
  }
}